package json.jackson;

import java.io.IOException;

import org.codehaus.jackson.JsonParseException;
import org.codehaus.jackson.map.JsonMappingException;
import org.codehaus.jackson.map.ObjectMapper;

public class Test {

	public static void main(String[] args) throws JsonParseException,
			JsonMappingException, IOException {
		// String aa = "{\"age\":25,\"name\":\"�Ի�\"}";
		// Person a = mapper.readValue(aa, Person.class);

		ObjectMapper mapper = new ObjectMapper();
		String aa = new String(mapper.writeValueAsString(new Person(25, "�Ի�"))
				.getBytes("utf-8"), "utf-8");
		Person xx=mapper.readValue(aa, Person.class);
		System.out.println(xx.getName());
	}
}
